<?php
/**
 * 权限资源分配表
 */

namespace Plu\Library\Models\Platform\Permission;

use Phalcon\Mvc\Model;

class PermissionResourceOfRole extends Model {
    public $Id;

    public $RoleId;

    public $ResourceId;

    public function getSource() {
        return "PermissionResourceOfRole";
    }

    public function initialize() {
        $this->setReadConnectionService('db.platform.slave');
        //绑定表的关系连
        $this->belongsTo('ResourceId', 'Plu\Library\Models\Platform\Permission\PermissionResource', 'Id', array( 'alias' => 'PermissionResource' ));
    }
}


?>
